package com.aruio.controller;

import com.arui.Result;
import com.aruio.entity.Panda;
import com.aruio.service.PandaService;
import com.aruio.vo.TestVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * @Date 2024/10/11 9:27
 * @Created by 10574
 */
@RestController
@RequestMapping("test")
@RequiredArgsConstructor
public class TestController {
    private final PandaService pandaService;

    @GetMapping("test")
    public Result<TestVO> test() {
        final Page<Panda> page = new Page<>(1, 10);
        pandaService.page(page);
        return Result.data(new TestVO(page.getRecords()));
    }
}
